<script setup lang="ts">
const food={
  name:'kfc',
  title:'疯狂星期四',
  sth(){
    console.log('v me ￥50')
    alert('v me ￥50')
    return '￥50'
  }

}

const clickothersth=()=>{
  alert('v不了一点')
}
</script>

<template>
  <div>{{ food }}</div>
  <h2>{{ food.title }}</h2>
  <h3>{{ food.sth() }}</h3>
  <button @click="food.sth">'v'</button>
  <button @click="clickothersth">'v2'</button>

</template>

<style scoped></style>
